

#include "platform.h"

void taskFunction(void* arg){
    int num = *(int*)arg;
    printf("thread-%ld is working, number=%d \n", pthread_self(), num);

    sleep(1);       //s
    
}

int main(int argc, char** argv){
    Platform* platformPtr = new Platform();

    int count = 5;
    while (1)
    {
        sleep(1);
        printf("please input 'q' to exit\n");
        char ch = cin.get();
        if( ch == 'q')
		{
            printf("\033[1;32m *** start exit main thread ***\033[0m\n");
            break;
	    }
    }

    delete platformPtr;

    if(LogerPtr != NULL){
        delete LogerPtr;
        LogerPtr = NULL;
    }
    if(ParamsPtr != NULL){
        delete ParamsPtr;
        ParamsPtr = NULL;
    }
printf("main.cpp exit successfully\n");
return 0;
}